{% extends "root/templates/base.html" %}

{% block content %}
<h2>View data for an individual person</h2>
<form method="POST">
  {% if primary_key %}
  <input type="hidden" name="key" value="{{ primary_key }}">
  {% endif %}
  {% for valueset in valuesets %}
  <fieldset>
    <legend>{{ valueset.fieldset.verbose_name }}</legend>
    <table>
      {% for entry in valueset.to_tuples %}<tr class="alt2">
        <td class="property">{{ entry.0|remove_underscore|title }}</td>
        <td class="value">
          <input type="text" name="{{valueset.fieldset.key}}#{{entry.1}}" value="{{ entry.2 }}" />
        </td>
      </tr>{% endfor %}
    </table>
  </fieldset>
  {% endfor %}
<input type="Submit" value="Save Changes" />
</form>

{% endblock content %}